<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>We are 伐木累！</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/bootstrap-select.min.css" rel="stylesheet">
    <link href="/css/index.css" rel="stylesheet">
    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/js/bootstrap-select.min.js"></script>
    <script src="/js/defaults-zh_CN.min.js"></script>
</head>
<body>
<header class="main-header" style="background-image: url(./image/bg-red.jpg)">
    <div class="container">
        <div class="row">
            <h1>We are 伐木累！</h1>
        </div>
    </div>
</header>
<nav class="main-navigation">
    <div class="container">
        <div class="row">
            <div class="navbar-collapse">
                <ul class="menu">
                    <li view="/wall"><a href="javascript:;">生日</a></li>
                    <li view="/tree?id=1"><a href="javascript:;">刘家</a></li>
                    <li view="/tree?id=70"><a href="javascript:;">李家</a></li>
                    <li view="/person"><a href="javascript:;">管理</a></li>
                </ul>
            </div>
        </div>
    </div>
</nav>
<section class="main-content">
    <div class="container">
        <div class="row" id="main-content"></div>
    </div>
</section>
<footer class="main-footer">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <span>&copy; <a href="https://family.liuzy88.com">VA伐木累</a></span> |
                <span><a href="http://www.miibeian.gov.cn/" target="_blank">湘ICP备16014575号</a></span> |
                <span><a href="https://gitee.com/liuzy1988/TheFamily" target="_blank">By liuzy</a></span>
            </div>
        </div>
    </div>
</footer>
<script>
    var currentView = 'wall';
    function loadView(view, params) {
        currentView = view || currentView;
        console.log('load', currentView);
        $('#main-content').load(currentView + (currentView.indexOf('?')===-1?'?':'&') + $.param(params || {}), function () {
            console.log('index load', currentView);
        });
    }
    $(function () {
        $('.menu li').on('click', function() {
            if (!$(this).hasClass('nav-current')) {
                $(this).addClass('nav-current').siblings().removeClass('nav-current');
            }
            loadView($(this).attr('view'))
        });
        $('.menu li')[0].click();
    })
</script>
</body>
</html>
